Proper connect_port
[juce-lv2.git] / juce / source / extras / the jucer / src / model / documents / jucer_ButtonDocument.h
blob9b6660020ca4ed23157a5cf753322bd83a49d7e0
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCER_BUTTONDOCUMENT_JUCEHEADER__
27 #define __JUCER_BUTTONDOCUMENT_JUCEHEADER__
29 #include "../jucer_JucerDocument.h"
32 //==============================================================================
33 /**
35 class ButtonDocument : public JucerDocument
37 public:
38 //==============================================================================
39 ButtonDocument();
40 ~ButtonDocument();
42 //==============================================================================
43 const String getTypeName() const;
45 JucerDocument* createCopy();
46 Component* createTestComponent (const bool alwaysFillBackground);
48 int getNumPaintRoutines() const;
49 const StringArray getPaintRoutineNames() const;
50 PaintRoutine* getPaintRoutine (const int index) const;
52 void setStatePaintRoutineEnabled (const int index, bool b);
53 bool isStatePaintRoutineEnabled (const int index) const;
55 int chooseBestEnabledPaintRoutine (int paintRoutineWanted) const;
57 ComponentLayout* getComponentLayout() const { return 0; }
59 void addExtraClassProperties (PropertyPanel* panel);
61 //==============================================================================
62 XmlElement* createXml() const;
63 bool loadFromXml (const XmlElement& xml);
65 void fillInGeneratedCode (GeneratedCode& code) const;
66 void fillInPaintCode (GeneratedCode& code) const;
68 void getOptionalMethods (StringArray& baseClasses,
69 StringArray& returnValues,
70 StringArray& methods,
71 StringArray& initialContents) const;
73 //==============================================================================
74 PaintRoutine* paintRoutines[7];
75 bool paintStatesEnabled [7];
79 #endif // __JUCER_BUTTONDOCUMENT_JUCEHEADER__